#include "../include/stu.h"
void change_c(){
    system("clear");
    printf("输入要修改的课程号\n");
    char name[40],type[20];
    int id,time,credit,selectde,limit; 
    struct course *p1;
    p1 = head2;
    scanf("%d",&id);
    while (p1 != NULL) {
        if (p1->id == id){
            printf("输入：\n");
            printf("课程名\t课程性质\t学时\t学分\t已选人数\t可选人数\n");
            scanf("%s %s %d %d %d %d",name,type,&time,&credit,&selectde,&limit);
            
            strcpy(p1->name,name);
            strcpy(p1->type,type);
            p1->time = time;
            p1->credit = credit;
            p1->selectde = selectde;
            p1->limit = limit;
            printf("change success\n");
            return ;
        }
        p1 = p1->next;
    }
    printf("课程号不存在\n");
}
